﻿using System;

namespace Moonlite.Languages.Andromeda
{
    public abstract class AbstractAndromedaParserFactoryProvider : IAndromedaParserFactoryProvider
    {
        private IAndromedaParserFactory andromedaParserFactory;
        protected abstract IAndromedaParserFactory CreateParserFactoryCore();
        public IAndromedaParserFactory GetParserFactory()
        {
            if (andromedaParserFactory == null)
            {
                andromedaParserFactory = CreateParserFactoryCore();
            }

            return andromedaParserFactory;
        }

        protected AbstractAndromedaParserFactoryProvider()
        {
        }
    }
}
